package com.eshop.we.service;


import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.eshop.we.banner.api.BannerService;
import com.eshop.we.banner.entity.Banner;
import com.eshop.we.mapper.BannerMapper;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * <p>
 * banner表 服务实现类
 * </p>
 *
 * @author anonymity
 * @since 2018-07-04
 */
@Service(interfaceClass = BannerService.class)
@Component
public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> implements BannerService {

    @Override
    public List<Banner> selectAllOrderSort() {
        EntityWrapper<Banner> wrapper = new EntityWrapper<>();
        wrapper.orderBy("sort_num");
        return baseMapper.selectList(wrapper);
    }
}
